import Vue from 'vue'
import Vuex from 'vuex'


Vue.use(Vuex);

import user from './api/user'
import remark from './api/remark'
import category from './api/category'
import plate from './api/plate'
import page from './api/page'
import notice from "./api/notice"
import adminCategory from './api/admin/category'
import adminNotice from './api/admin/notice'
import adminUser from  './api/admin/user'
import adminRemark from  './api/admin/remark'
import adminPlate from  './api/admin/plate'
import adminPageType from  './api/admin/pageType'
import adminPage from  './api/admin/page'
export default new Vuex.Store({
	state: {
		user: {}
	},
	getters: {
		User: state => {
			return state.user;
		}
	},
	mutations: {
		register: function (state, [key, value]) {
			state[key] = value;
		},
	},
	actions: {},
	modules: {
		user,
		remark,
		category,
		plate,
		page,
		notice,
		adminCategory,
		adminNotice,
		adminUser,
		adminRemark,
		adminPlate,
		adminPageType,
		adminPage
	}
})
